
// const line = readline();

// 质数为除了1和它本身 因数就是可以整除的数
function getCode(num){
    const result = [];
    // 区间为2到
    let i = 2,temp = num;
    while(i<=temp&& i*i<=temp){
        while(num%i === 0){
            result.push(i);
            num/=i;
        }
        i++;
    }

    if(num !== 1){
        result.push(num);
    }

    return result;
}

const res = getCode(18000);
// console.log(res)

console.log(res.join(' '))